package com.example.makerspace.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.example.makerspace.mapper.MybatisListHandler;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.util.List;

@EqualsAndHashCode(callSuper = true)
@Data
@TableName(value = "t_user_demand", autoResultMap = true)
@Document(indexName = "t_user_demand")
public class UserDemandDO extends BaseDO{
    public final static String DEMAND_NAME = "demand_name";

    @Field(name = "demand_name", type = FieldType.Text, analyzer="ik_max_word")
    private String demandName;

    @Field(name = "category", type = FieldType.Text, analyzer="ik_max_word")
    private String category;

    @Field(name = "keyword", type = FieldType.Text, analyzer="ik_max_word")
    @TableField(typeHandler = MybatisListHandler.class)
    private List<String> keyword;

    @TableField(typeHandler = MybatisListHandler.class)
    @Field(name = "demand_desc", type = FieldType.Text, analyzer="ik_max_word")
    private List<String> demandDesc;

    private String picture;

    private String meeting;
    @Field(name = "is_show", type = FieldType.Text, analyzer="ik_max_word")
    private Integer  isShow;;
    @Field(name="product_overview",type = FieldType.Text, analyzer="ik_max_word")
    private  String productOverview;
    @Field(name="product_advantages",type = FieldType.Text, analyzer="ik_max_word")
    private  String productAdvantages;
    @Field(name="company_information",type = FieldType.Text, analyzer="ik_max_word")
    private  String companyInformation;
    @Field(name="company_address",type = FieldType.Text, analyzer="ik_max_word")
    private  String companyAddress;
    @Field(name="company_name",type = FieldType.Text, analyzer="ik_max_word")
    private  String companyName;
    @Field(name="username",type = FieldType.Text, analyzer="ik_max_word")
    private  String username;
}
